package com.itgacl.magic4j.libcommon.component.license;

/**
 * @author gacl
 * @version 1.0
 * @description: License常量定义
 * @date 2021/12/26 14:44
 */
public class LicenseConstants {

    /**
     * 单机模式
     **/
    public static final int MODE_SINGLE = 0;
    /**
     * 时限模式
     **/
    public static final int MODE_INTIME = 1;
    /**
     * 联网模式
     **/
    public static final int MODE_ONLINE = 2;

    /**
     * License加载
     **/
    public static final int STATE_NONE = 0;
    /**
     * License无效或文件错误等
     **/
    public static final int STATE_FAILD = 1;
    /**
     * License超时
     **/
    public static final int STATE_TIMEOUT = 2;
    /**
     * License非本机运行
     **/
    public static final int STATE_CODE_ERR = 3;

    /**
     * License被禁用
     */
    public static final int STATE_CODE_FROZEN = 4;

    /**
     * License正常
     **/
    public static final int STATE_SUCCESS = 9;

    /**
     * 验证模式
     **/
    public static final int CONTENT_MODE = 0;
    /**
     * 机器码
     **/
    public static final int CONTENT_CODE = 1;
    /**
     * 总可用时长
     **/
    public static final int CONTENT_TIME = 2;

    /**
     * 项目在系统部署的根目录
     */
    public static final String ROOT_PATH = System.getProperty("user.dir") + "/";


    /**
     * license文件存储根目录
     */
    public static final String LICENSE_ROOT_PATH = ROOT_PATH + "lic/";

    /**
     * license文件名称
     */
    public static final String licenseFileName = "appLicense.lic";

    public interface STATUS_CODE {
        int NORMAL = 0;//正常
        int FROZEN = 1;//禁用
        int EXPIRE = 2;//过期
        int INVALID = 3;//授权码无效
        int ERROR = 9999;//校验出错
    }
}
